from bip44 import Wallet

def get_tron_private_key(mnemonic: str) -> str:
    # 生成符合BIP44标准的TRON路径
    wallet = Wallet(mnemonic)
    # TRON专用路径 m/44'/195'/0'/0/0
    private_key, _ = wallet.derive_account(195, account=0, change=0, address_index=0)
    return private_key.hex()

# 使用示例
if __name__ == "__main__":
    # test_mnemonic = "bright away six hold lecture end live spoil broom supreme wagon result"  # 替换为实际助记词
    test_mnemonic="mule fade wish picnic afraid agent property wise piano vague upon false"
    tmp=get_tron_private_key(test_mnemonic)
    # e0d139330306e11ffc80db4b44c8e080c0f5c41c869c8225aa27125c0df05dfd
    print("TRON私钥:", tmp)
    print(len(tmp))
    #0x967208da3a945152835838fa3d0c70ecb808fd2d932f3da0d16c16543f0aa3f1